Repository navigation
Feature A: Start new task branches at their published head - #1097
Conversation
A task for an already pushed branch (for example a pull request's head) started a fresh worktree at the captured base, because the local branch did not exist. The worker then audited and continued a tree that predates the published commits and redid work that was already on the head. Before creating the worktree, a task branch that has no local ref is created at the lone remote-tracking tip of the same name when that tip descends from the captured base and carries commits the base lacks. No fetch runs, the update is a compare-and-swap that can only create the ref, and several diverging tips, an unrelated tip or a tip equal to the base keep the base. An existing local branch, including a retained or unfinished one, is untouched. Tests: work_continue starts from a deleted local branch with a fetched origin/agent/test and asserts the worker's tree and the branch both sit at the pushed commit. Fixes #1052
|
First-pass review by oxa → oxc →
TIER: T2 🤖 Generated with Claude Code (oxa review lane) |
Adopting the published head created refs/heads/<task> before the worktree existed, but the sandboxed checkout still ran `git checkout -b <task> HEAD` for a task without a local branch and failed with "a branch named '<task>' already exists", blocking every task whose branch had just been adopted. The adoption now reports whether it created the ref. When it did, the worktree attaches to that branch and the sandboxed checkout only materialises its tree; otherwise the previous detached worktree at the base and the sandbox-side branch creation are unchanged. Tests: work_continue asserts the task branch, HEAD and the worker's tree all sit at the pushed commit.
…heckout The published-head test asserted `symbolic-ref HEAD` in the source checkout, which `oxa work` deliberately never moves: it stays on the captured base while the task branch is created for the worktree. The assertion therefore checked the wrong repository and failed. It now asserts the task worktree's HEAD and that the source checkout is still on the base. Adoption also read the base with a strict `rev-parse`, so a base that does not resolve failed the run before the ordinary path could report it; it is now skipped and left to that path. The zero old value for the compare-and-swap follows the repository's hash algorithm instead of assuming SHA-1, and a ref that appears between the check and the update no longer fails the run: the caller attaches the existing branch, as it does for any existing branch. Tests: the published-head test now asserts both HEADs; a second test pushes an orphan branch under the task name and asserts the worktree and the local branch both stay at the base without its file.
|
First-pass review by oxa → oxc →
🤖 Generated with Claude Code (oxa review lane) |
|
@codex review |
|
@codex security review |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
Security findingsAdvisory findings (3)
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. Swish! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
There was a problem hiding this comment.
🛡️ Codex Security Review
Here are some automated security review suggestions for this pull request.
Reviewed commit: ca01b0031a
ℹ️ About Codex security reviews in GitHub
This is an experimental Codex feature. Security reviews are triggered when:
- You comment "@codex security review"
- A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review
Once complete, Codex will leave suggestions, or a comment if no findings are found.
# Conflicts: # oxa/oxa-cli/src/work_checks.rs # oxa/oxa-cli/tests/common/work.rs # oxa/oxa-work/src/committed.rs # oxa/oxa-work/src/lib.rs # oxa/oxa-work/src/tree.rs
# Conflicts: # oxa/oxa-cli/tests/common/work.rs
|
@codex review |
|
@codex security review |
|
Codex Review: Didn't find any major issues. More of your lovely PRs please. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
There was a problem hiding this comment.
🛡️ Codex Security Review
Here are some automated security review suggestions for this pull request.
Reviewed commit: e9af6ccad1
ℹ️ About Codex security reviews in GitHub
This is an experimental Codex feature. Security reviews are triggered when:
- You comment "@codex security review"
- A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review
Once complete, Codex will leave suggestions, or a comment if no findings are found.
|
@codex review |
|
@codex security review |
|
@codex review |
|
@codex security review |
|
Codex Review: Didn't find any major issues. 👍 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
🛡️ Codex Security ReviewSecurity review completed. No security issues were found in this pull request. Reviewed commit: Only the user who started this review can view the report in Codex. ℹ️ About Codex security reviews in GitHubThis is an experimental Codex feature. Security reviews are triggered when:
Once complete, Codex will leave suggestions, or a comment if no findings are found. |
|
Merged as 435013b at 2026-11-18T02:05:07Z. Merge-group integration 44219420023 passed on that exact landed commit. Source 206fa3e passed selected x86/ARM lane 44213792874 and full required CI 44215750284, with the fresh owner read and current-head Code/security reviews clear. All three historical findings are addressed and resolved; dedicated before/after controls are retained. No earlier-head approval or CI result was substituted. Both lifecycle fixes (#1043 and #1097) and the Core binding slices (#1220 and #1254) have now landed. The complete native board/caller/completion acceptance remains a separate, assigned integration task; these merges do not claim the whole #307 row complete. Helpers remain paused. |
Feature A (#1214), T3. Fixes #1052. Ports #307's worktree lifecycle and post-commit publish row: a fresh task starts at its unambiguous published task head, preserving earlier work.
Published-head selection reads Git metadata only. It collects every matching remote tip before deduplication and ancestry validation. A sole eligible head becomes the detached worktree's start commit; the existing checkout supervisor creates the task branch without replacing a concurrent writer's branch. Adopted materialization uses the restricted execution policy. Local save and merge preserve sandboxed callbacks, refusal and work retention.
Current candidate
206fa3e404850a6282b00cf4ef3807007c7dac44is Ready after the repair passed its selected lane. Automatic acceptance now applies the existing user network/offline policy without GitHub authentication lookup or injection. The policy implementation is shared with the existing front-end guard; no new setting, store or authority. Adopted checkout restrictions and the landed #1043 normalization/holder/original-OID safeguards remain. Main's publication/save-recovery, diagnostic scrub, reviewed-head, checkpoint and lock/handover guards are preserved.Validation:
4c11c23d: before lane 44211784225 failed at runtime. ARM ran 4,804 tests: 4,803 passed, one intended new assertion failed after successful task completion and positive acceptance execution; three existing opt-in tests were skipped. The synthetic real-binary regression also covers online/offline policy and verifies that host authentication is not consulted. No real credentials or external services.206fa3e4: lane 44213792874 SUCCESS, oxa and oxc-rs on x86_64/ARM64, including the online/offline regression. Ready full required CI 44215750284 SUCCESS; every required check is pass/expected skip. The owner freshly read and approved this exact repaired scope.435013b2085b7ea9ad69a0633aa328cab96642b5; queue integration 44219420023 passed on that exact landed commit. No earlier approval or CI result was substituted.e9af6ccapassed lane 44207390279 and Ready full required 44207311487 with Code review clear. Its security review identified the additional scope now being repaired. The earlier18bc55c7passed lane 44204858138 on all 28 oxa crates plus oxc-rs on x86_64 and ARM64. These are provenance only.09f29dbbhit an existing guard and is fixture feedback, not product failure proof.Existing branch
oxa/issue-1052; normal main merges resolved actual conflicts. No history rewrite, helper activation or lab script changes. Core #1254 and its consumer ownership remain separate.